#ifndef __DMR_I2C_H_
#define __DMR_I2C_H_

#include "n32g430_i2c.h"


typedef struct
{
	uint8_t slaveAddr;
	uint16_t 		sclPin;
	uint16_t 		sdaPin;
	GPIO_Module* 	sclGpiox;
	GPIO_Module* 	sdaGpiox;
}dmr_i2cHandle;

void dmr_i2cMasterDefInit(dmr_i2cHandle *handle);
void dmr_i2cInit(dmr_i2cHandle *handle);
uint8_t dmr_i2cMasterSendByte(dmr_i2cHandle *handle ,uint8_t* tData, uint8_t tLen);
uint8_t dmr_i2cMasterRecvByte(dmr_i2cHandle *handle ,uint8_t registerAddr,uint8_t* rdata, uint8_t rlen);

#endif


